<?php

use App\Helpers\FunTool;
use App\Jobs\Activate;
use App\Jobs\ActivateDispose;
use App\Jobs\OtcSuccess;
use App\Models\Certification;
use App\Models\DayTimes;
use App\Models\Pack;
use App\Models\PackLogs;
use App\Models\User;
use App\Models\UserDay;
use App\Services\GroupBuying\GoOrderService;
use App\Services\Otc\Order;
use App\Services\Pack\PackService;
use App\Services\Toolkit\ToolkitService;
use Illuminate\Foundation\Inspiring;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Storage;
use Overtrue\EasySms\EasySms;

/*
|--------------------------------------------------------------------------
| Console Routes
|--------------------------------------------------------------------------
|
| This file is where you may define all of your Closure based console
| commands. Each Closure is bound to a command instance allowing a
| simple approach to interacting with each command's IO methods.
|
*/
Artisan::command('resetadmin', function () {
    $model = config('admin.database.users_model');
    $user = (new $model)->find(1);
    $user->username = 'admin';
    $user->password = bcrypt('qq123456');
    $user->save();
    dd('success');
})->describe('重置admin账号密码');
Artisan::command('inspire', function () {
    $this->comment(Inspiring::quote());
})->purpose('Display an inspiring quote');

Artisan::command('test', function () {
    dd(config('database.connections.mysql.password'));
    dd(trans('jobposition.fields.company_id'));
    $disk = Storage::disk();
    $url = $disk->url('my-images/GZvvii7T7YvZwf7OxEqA32V9rhHYKKBnO8CqHFa7.png');
    dd($url);
});
